package com.cn.wanxi.thread;

public class MyRunnableTest {
    public static void main(String[] args) {
//        MyRunnable myRunnable = new MyRunnable();
//        myRunnable.run();
        Thread thread = new Thread(new MyRunnable(),"线程1");
//        thread.setName("线程1");
        thread.start();
        MyRunnable myRunnable1 = new MyRunnable();
        Thread thread1 = new Thread(myRunnable1);
        thread1.setName("线程2");
        thread1.start();
    }
}
